package com.appengine.paranoid_android.lost;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class BootCompleteReceiver extends BroadcastReceiver {
  private static final boolean DEBUG = true;
  private static final String TAG = "Info.BroadcastReceiver";

  @Override
  public void onReceive(Context context, Intent intent) {
    if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
      if (DEBUG) Log.d(TAG, "System boot notification received.");
      Intent service = new Intent(context, InfoService.class);
      context.startService(service);
    } else {
      if (DEBUG) Log.d(TAG, "Intent received: " + intent);
    }
  }
}
